package day23;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo9 {
    public static void main(String[] args) {
        try(FileInputStream fis = new FileInputStream("D:\\a\\b\\c\\qwe.mp4")) {
            FileOutputStream fos = new FileOutputStream("D:\\a\\b\\g\\c\\abc1.mp4");
            byte[] buf = new byte[1024];
            int len;
            long start = System.currentTimeMillis();
            while ((len = fis.read(buf)) != -1) {
                fos.write(buf, 0, len);
            }
            long end = System.currentTimeMillis();
            System.out.println((end-start)+"ms");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
